package org.holynite.fieldmanage.ejbs

import org.holynite.fieldmanage.Utils.ManagementException
import org.holynite.fieldmanage.entities.ChargeRule
import org.holynite.fieldmanage.entities.ChargeScheme

import javax.ejb.Remote

/**
 * Created by midnite on 15/1/25.
 */
@Remote
interface ChargeManagement {
	void addScheme(ChargeScheme scheme) throws ManagementException
	void saveScheme(ChargeScheme scheme) throws ManagementException
	void removeScheme(String schemeId) throws ManagementException
	void addRule(ChargeScheme scheme, ChargeRule rule) throws ManagementException
	void saveRule(ChargeRule rule) throws ManagementException
	void removeRule(String schemeId, String ruleId) throws ManagementException

	List<ChargeScheme> findSchemes(String keyword)
	ChargeScheme fetchSchemeById(String schemeId)
	ChargeScheme fillScheme(ChargeScheme scheme)
	List<ChargeRule> searchRules(String scheme, String keyword)
}